set more 1

/*
File:	cepr_org_geog.do
Date:	Nov 14, 2005, CEPR ORG Version 1.0
	Feb 10, 2009
	Mar 12, 2015, CEPR ORG Version 2.0
	Apr  1, 2015, CEPR ORG Version 2.0.1
	March 1, 2016, CEPR ORG Version 2.1
	Oct 12, 2016, CEPR ORG Version 2.1.1
	Feb 9, 2017, CEPR ORG Version 2.2
	Apr 21, 2017, CEPR ORG Version 2.2.1
	Apr 10, 2018, CEPR ORG Version 2.3
	Mar 22, 2019, CEPR ORG Version 2.4
	Jul 24, 2019, CEPR ORG Version 2.4.1
	Feb 05, 2020, CEPR ORG Version 2.5
	
Desc:	Creates consistent geographical variables for CEPR consistent
	extract	of CPS ORG
Note:	See copyright notice at end of program.
*/

/* Determine data year */
local year=year in 1
if `year'==-17345 {local year  = 1980}
di "`year'"

/* State */

lab var state "State"
#delimit ;
lab def state
11 "Maine"
12 "New Hampshire"
13 "Vermont"
14 "Massachusetts"
15 "Rhode Island"
16 "Connecticut"
21 "New York"
22 "New Jersey"
23 "Pennsylvania"
31 "Ohio"
32 "Indiana"
33 "Illinois"
34 "Michigan"
35 "Wisconsin"
41 "Minnesota"
42 "Iowa"
43 "Missouri"
44 "North Dakota"
45 "South Dakota"
46 "Nebraska"
47 "Kansas"
51 "Delaware"
52 "Maryland"
53 "District of Columbia"
54 "Virginia"
55 "West Virginia"
56 "North Carolina"
57 "South Carolina"
58 "Georgia"
59 "Florida"
61 "Kentucky"
62 "Tennessee"
63 "Alabama"
64 "Mississippi"
71 "Arkansas"
72 "Louisiana"
73 "Oklahoma"
74 "Texas"
81 "Montana"
82 "Idaho"
83 "Wyoming"
84 "Colorado"
85 "New Mexico"
86 "Arizona"
87 "Utah"
88 "Nevada"
91 "Washington"
92 "Oregon"
93 "California"
94 "Alaska"
95 "Hawaii"
;
#delimit cr
lab val state state
notes state: CPS: hg-st60, gestcen

/* Metropolitan area */

gen byte metro=0 if smsastat==2
replace metro=1 if smsastat==1
lab var metro "Metropolitan area"
notes metro: CPS: h-metsta, gemetsta

/* Central city */

tempvar urb
gen `urb'=centcity
drop centcity
if `year'~=1995 {
gen byte centcity=0 if `urb'~=.
replace centcity=1 if `urb'==1
}

lab var centcity "Central city"
notes centcity: BLS considers all 1995 data on SMSAs suspect
notes centcity: CPS: derived from hg-msas, gemsast, gtmsast

/* Suburb */

if `year'~=1995 {
gen byte suburb=0 if `urb'~=.
replace suburb=1 if `urb'==2
}

lab var suburb "Suburbs"
notes suburb: BLS considers all 1995 data on SMSAs suspect
notes suburb: CPS: derived from hg-msas, gemsast, gtmsast

/* Rural */

if `year'~=1995 {
gen byte rural=0 if `urb'~=.
replace rural=1 if `urb'==3
}

lab var rural "Rural"
notes rural: BLS considers all 1995 data on SMSAs suspect
notes rural: CPS: derived from hg-msas, gemsast, gtmsast

/* City codes */

/* city-related variables from the NBER extracts are included, 
but not yet documented or supported; note that NBER reports
that BLS warns that all SMSA coding for 1995 is suspect;
city codes were changed substantially in May 2004; coding below
makes no attempt to correct for these coding changes */

	/* A Tale of Two Cities */
gen byte nyc=.
lab var nyc "New York City, metro area"
gen byte la=.
lab var la "Los Angeles, metro area"
	/* smsastat */
notes smsastat: CPS: h-metsta gemetsta
	/* centcity */
notes centcity: Not available 1995:6-1995:8
notes centcity: CPS: hg-msas, gemsast, gtmsast
	/* smsa70 */
if 1986<=`year' {gen byte smsa70=.}
notes smsa70: Available 1979-1985:6
	/* smsa80 */
if `year'<=1984 | 1996<=`year' {gen byte smsa80=.}
notes smsa80: NBER says available 1985:10-1994:3, but appears in 1995
	/* smsa93 */
if `year'<=1994 {gen byte smsa93=.}	
notes smsa93: Available 1995:9-
	/* smsarank */
if 1986<=`year' {gen byte smsarank=.}
notes smsarank: Available 1979-1985:6
	/* cmsarank */
if `year'<=1985 | 1995<=`year' {gen byte cmsarank=.}
notes cmsarank: Available 1986-1994:3
notes cmsarank: CPS: hg-msar, gemsark
	/* pmsarank */
if `year'<=1985 | 1995<=`year' {gen byte pmsarank=.}
notes pmsarank: Available 1986-1994:3
notes pmsarank: CPS: hg-pmsa, gepmsrk
	/* icntcity */
if `year'<=1985 {gen byte icntcity=.}	
notes icntcity: Available 1986-
notes icntcity: CPS: h-inducc, geindvcc
	/* msafips */
if `year'<=1988 {gen byte msafips=.}
notes msafips: Available 1989-94 
notes msafips: Available 1995:1-1995:5; 1995:9-
notes msafips: Coding changes between 1994 and 1995
	/* cmsacode */
if `year'<=1988 {gen byte cmsacode=.}
notes cmsacode: Available 1989-1993
notes cmsacode: Available 1994:1-1994:3; 1995:9-

gen cbsasz=.
gen smsastat05=.

#delimit ;
lab define smsastat05
10420 "Akron, OH"
10500 "Albany, GA (Baker, Terrell, and Worth Counties not in sample)"     
10580 "Albany-Schenectady-Troy, NY"
10740 "Albuquerque, NM"
10900 "Allentown-Bethlehem-Easton, PA-NJ"
11020 "Altoona, PA"
11100 "Amarillo, TX (Armstrong and Carson Counties not in sample)"
11300 "Anderson, IN"
11340 "Anderson, SC"
11460 "Ann Arbor, MI"
11500 "Anniston-Oxford, AL"
11540 "Appleton, WI"
11700 "Asheville, NC (Haywood and Madison Counties not in sample)"
12020 "Athens-Clarke County, GA (Oglethorpe County not in sample)"
12060 "Atlanta-Sandy Springs-Marietta, GA (Haralson, Heard, Jasper,Meriwether and Spalding Counties not in sample)"
12100 "Atlantic City, NJ"
12260 "Augusta-Richmond County, GA-SC"
12420 "Austin-Round Rock, TX"
12540 "Bakersfield, CA"
12580 "Baltimore-Towson, MD"
12940 "Baton Rouge, LA"
13140 "Beaumont-Port Arthur, TX"
13380 "Bellingham, WA"
13460 "Bend, OR"
13740 "Billings, MT (Carbon County not in sample)"
13780 "Binghamton, NY"
13820 "Birmingham-Hoover, AL"
14020 "Bloomington, IN (Owen County in sample)"
14060 "Bloomington-Normal, IL"
14260 "Boise City-Nampa, ID (Owyhee County not in sample)"
14500 "Boulder, CO"
14540 "Bowling Green, KY"
14740 "Bremerton-Silverdale, WA"
15180 "Brownsville-Harlingen, TX"
15380 "Buffalo-Niagara Falls, NY"
15940 "Canton-Massillon, OH"
15980 "Cape Coral-Fort Myers,FL"
16300 "Cedar Rapids, IA (Benton and Jones Counties not in sample)"
16580 "Champaign-Urbana, IL (Ford County not in sample)"
16620 "Charleston, WV (Clay County not in sample)"
16700 "Charleston-North Charleston, SC"
16740 "Charlotte-Gastonia-Concord, NC-SC (Anson County, NC not in sample)"  
16860 "Chattanooga, TN-GA"
16980 "Chicago-Naperville-Joliet, IL-IN-WI (DeKalb, IL; Jasper, IN; and Kenosha, WI Counties not in sample)"
17020 "Chico, CA"
17140 "Cincinnati-Middletown, OH-KY-IN (Franklin County , IN not in sample; Dearborn and Ohio Counties, IN not identified)"
17460 "Cleveland-Elyria-Mentor, OH"
17660 "Coeur d'Alene, ID"
17820 "Colorado Springs, CO"
17860 "Columbia, MO (Howard County not in sample)"
17900 "Columbia, SC"
17980 "Columbus, GA-AL (Harris County, GA and Russell County, Alabama not in sample)"
18140 "Columbus, OH (Morrow County not in sample)"
18580 "Corpus Christi, TX"
19100 "Dallas-Fort Worth-Arlington, TX (Delta and Hunt Counties not in sample)"
19340 "Davenport-Moline-Rock Island, IA-IL"
19380 "Dayton, OH"
19460 "Decatur, Al"
19500 "Decatur, IL"
19660 "Deltona-Daytona Beach-Ormond Beach, FL"
19740 "Denver-Aurora, CO"
19780 "Des Moines, IA"
19820 "Detroit-Warren-Livonia,MI"
20100 "Dover, DE"
20260 "Duluth, MN-WI (Carlton County, MN not in sample, WI portion not identified)"
20500 "Durham, NC"
20740 "Eau Claire, WI"
20940 "El Centro, CA"
21340 "El Paso, TX"
21500 "Erie, PA"
21660 "Eugene-Springfield, OR"
21780 "Evansville, IN-KY (Gibson County, IN and Kentucky portion not in sample)"
22020 "Fargo, ND-MN (MN portion not identified)"
22140 "Farmington, NM"
22180 "Fayetteville, NC"
22220 "Fayetteville-Springdale-Rogers, AR-MO (Madison County, AR and Missouri portion not in sample)"
22420 "Flint, MI"
22460 "Florence, AL"
22660 "Fort Collins-Loveland, CO"
22900 "Fort Smith, AR-OK (Oklahoma portion not in sample)"
23020 "Fort Walton Beach-Crestview-Destin, FL"
23060 "Fort Wayne, IN"
23420 "Fresno, CA"
23540 "Gainesville, FL (Gilchrist County not in sample)"
24340 "Grand Rapids-Wyoming, MI"
24540 "Greeley, CO"
24580 "Green Bay, WI (Oconto County not in sample)"
24660 "Greensboro-High Point, NC"
24860 "Greenville, SC (Laurens and Pickens Counties not in sample)"
25060 "Gulfport-Biloxi, MS (Stone County not in sample)"
25180 "Hagerstown-Martinsburg, MD-WV (Berkeley County, WV not identified and Morgan County, WV not in sample)"
25420 "Harrisburg-Carlisle, PA"
25500 "Harrisonburg, VA"
25860 "Hickory-Morganton-Lenoir, NC (Caldwell County not in sample)"
26100 "Holland-Grand Haven, MI"
26180 "Honolulu, HI"
26420 "Houston-Baytown-Sugar Land, TX"
26580 "Huntington-Ashland, WV-KY-OH (Kentucky and Ohio portions not identified)"
26620 "Huntsville, AL"
26900 "Indianapolis, IN"
26980 "Iowa City, IA (Washington County not in sample)"
27100 "Jackson, MI"
27140 "Jackson, MS"
27260 "Jacksonville, FL"
27340 "Jacksonville, NC"
27500 "Janesville, WI"
27740 "Johnson City, TN"
27780 "Johnstown, PA"
27900 "Joplin, MO"
28020 "Kalamazoo-Portage, MI"
28100 "Kankakee-Bradley, IL"
28140 "Kansas City, MO-KS (Franklin, KS; Leavenworth, KS; Linn, KS; Bates,MO; and Caldwell, MO Counties not in sample)"
28660 "Killeen-Temple-Fort Hood, TX" 
28700 "Kingsport-Bristol, TN-VA (Virginia portion not identified)"
28740 "Kingston, NY"
28940 "Knoxville, TN (Anderson County not in sample)"
29100 "La Crosse, WI-MN (Houston County not in sample)"
29180 "Lafayette, LA"
29340 "Lake Charles, LA (Cameron Parish not in sample)"
29460 "Lakeland-Winter Haven, FL"
29540 "Lancaster, PA"
29620 "Lansing-East Lansing, MI"
29700 "Laredo, TX"
29740 "Las Cruces, NM"
29820 "Las Vegas-Paradise, NV"
29940 "Lawrence, KS"
30020 "Lawton, OK"
30460 "Lexington-Fayette, KY"
30780 "Little Rock-North Little Rock, AR (Perry County not in sample)"
30980 "Longview, TX (Rusk and Upshur Counties not in sample)"
31100 "Los Angeles-Long Beach-Santa Ana, CA"
31140 "Louisville, KY-IN (Washington, IN; Henry, KY; Nelson, KY; Shelby,KY; and Trimble, KY Counties not in sample)"
31180 "Lubbock, TX (Crosby County not in sample)"        
31340 "Lynchburg, VA (Appomattox and Bedford Counties and Bedford City not in sample)"
31420 "Macon, GA (Crawford, Monroe, and Twiggs Counties not in sample)"
31460 "Madera, CA"
31540 "Madison, WI (Iowa County not in sample)"
32580 "McAllen-Edinburg-Pharr, TX"
32780 "Medford, OR"
32820 "Memphis, TN-MS-AR (Arkansas portion not identified and Tunica County, MS not in sample)"
32900 "Merced, CA"
33100 "Miami-Fort Lauderdale-Miami Beach, FL"
33140 "Michigan City-La Porte, IN"
33260 "Midland, TX"
33340 "Milwaukee-Waukesha-West Allis, WI"
33460 "Minneapolis-St Paul-Bloomington, MN-WI (Wisconsin portion not identified)"
33660 "Mobile, AL"
33700 "Modesto, CA"
33740 "Monroe, LA"
33780 "Monroe, MI"
33860 "Montgomery, AL"
34740 "Muskegon-Norton Shores, MI"
34820 "Myrtle Beach-Conway-North Myrtle Beach, SC"
34900 "Napa, CA"
34940 "Naples-Marco Island, FL"
34980 "Nashville-Davidson-Murfreesboro, TN (Cannon, Hickman and Macon Counties not in sample)"
35380 "New Orleans-Metairie-Kenner, LA"
35620 "New York-Northern New Jersey-Long Island, NY-NJ-PA (Pennsylvania portion not in sample. White Plains central city recoded to balance of metropolitan)"
35660 "Niles-Brenton Harbor, MI"
36100 "Ocala, FL"
36140 "Ocean City, NJ"
36260 "Ogden-Clearfield, UT"
36420 "Oklahoma City, OK"
36500 "Olympia, WA"
36540 "Omaha-Council Bluffs, NE-IA"
36740 "Orlando, FL"
36780 "Oshkosh-Neenah, WI"
37100 "Oxnard-Thousand Oaks-Ventura, CA"
37340 "Palm Bay-Melbourne-Titusville, FL"
37460 "Panama City-Lynn Haven, FL"
37860 "Pensacola-Ferry Pass-Brent, FL"
37900 "Peoria, IL"
37980 "Philadelphia-Camden-Wilmington, PA-NJ-DE"
38060 "Phoenix-Mesa-Scottsdale, AZ"
38300 "Pittsburgh, PA"
38900 "Portland-Vancouver-Beaverton, OR-WA (Yamhill County, OR not in sample)"
38940 "Port St. Lucie-Fort Pierce, FL"
39100 "Puoghkeepsie-Newburgh-Middletown, NY"
39140 "Prescott, AZ"
39340 "Provo-Orem, UT (Juab County not in sample)"
39380 "Pueblo, CO"
39460 "Punta Gorda, FL"
39540 "Racine, WI"
39580 "Raleigh-Cary, NC"
39740 "Reading, PA"
39900 "Reno-Sparks, NV"
40060 "Richmond, VA (Cumberland County not in sample)"
40140 "Riverside-San Bernardino-Ontario, CA"
40220 "Roanoke, VA (Craig and Franklin Counties not in sample)"
40380 "Rochester, NY"
40420 "Rockford, IL"
40900 "Sacramento-Arden-Arcade-Roseville, CA"
40980 "Saginaw-Saginaw Township North, MI"
41060 "St. Cloud, MN"
41180 "St. Louis, MO-IL (Calhoun County, IL not in sample)"
41420 "Salem, OR"
41500 "Salinas, CA"
41540 "Salisbury, MD"
41620 "Salt Lake City, UT (Tooele County not in sample)"
41700 "San Antonio TX"
41740 "San Diego-Carlsbad-San Marcos, CA"
41860 "San Francisco-Oakland-Freemone, CA"
41940 "San Jose-Sunnyvale-Santa Clara, CA"
42020 "San Luis Obispo-Paso Robles, CA"
42060 "Santa Barbara-Santa Maria-Goleta, CA"
42100 "Santa Cruz-Watsonville, CA"
42140 "Santa Fe, NM"
42220 "Santa Rose-Petaluma, CA"
42260 "Sarasota-Bradenton-Venice, FL"
42340 "Savannah, GA"
42540 "Scranton-Wilkes-Barre, PA"
42660 "Seattle-Tacoma-Bellevue, WA"
43340 "Shreveport-Bossier City, LA"
43620 "Sioux Falls, SD"
43780 "South Bend-Mishawaka, IN-MI (Michigan portion not identified)"
43900 "Spartanburg, SC"
44060 "Spokane, WA"
44100 "Springfield, IL"
44180 "Springfield, MO (Dallas and Polk Counties not in sample)"
44220 "Springfield, OH"
44700 "Stockton, CA"
45060 "Syracuse, NY"
45220 "Tallahassee, FL"
45300 "Tampa-St. Petersburg-Clearwater, FL"
45780 "Toledo, OH (Ottawa County not in sample)"       
45820 "Topeka, KS (Jackson and Jefferson Counties not in sample)" 
45940 "Trenton-Ewing, NJ"
46060 "Tucson, AZ"
46140 "Tulsa, OK (Okmulgee County not in sample)"
46220 "Tuscaloosa, AL (Greene and Hale Counties not in sample)"
46540 "Utica-Rome, NY"
46660 "Valdosta, GA (Lanier County not in sample)"
46700 "Vallejo-Fairfield, CA"
46940 "Vero Beach, FL"
47020 "Victoria, TX"
47220 "Vineland-Millville-Bridgeton, NJ"
47260 "Virginia Beach-Norfolk-Newport News, VA-NC (North Carolina portion not identified)"
47300 "Visalia-Porterville, CA"
47380 "Waco, TX"
47580 "Warner Robins, GA"
47900 "Washington-Arlington-Alexandria, DC-VA-MD-WV (West Virginia portion not identified. Reston central city recoded to balance of metropolitan.)"
47940 "Waterloo-Cedar Falls, IA (Grundy County not in sample)"       
48140 "Wausau, WI"
48620 "Wichita, KS"
49180 "Winston-Salem, NC"
49420 "Yakima, WA"
49620 "York-Hanover, PA"
49660 "Youngstown-Warren-Boardman, OH-PA (Pennsylvania portion not in sample)"
70750 "Bangor, ME"
70900 "Barnstable Town, MA"
71650 "Boston-Cambridge-Quincy, MA-NH"
71950 "Bridgeport-Stamford-Norwalk, CT"
72400 "Burlington-South Burlington, VT"
72850 "Danbury, CT"
73450 "Hartford-West Hartford-East Hartford, CT"
74500 "Leominster-Fitchburg-Gardner, MA"
75700 "New Haven, CT"
76450 "Norwich-New London, CT-RI (RI portion recoded to Providence NECTA)"
76750 "Portland-South Portland, ME"
77200 "Providence-Fall River-Warwick, RI-MA"
77350 "Rochester-Dover, NH-ME (Maine portion not identified)"
78100 "Springfield, MA-CT (Connecticut portion not identified)"
78700 "Waterbury, CT"
79600 "Worcester, MA-CT (Connecticut portion not identified)"
;
#delimit cr

lab val smsastat05 smsastat05
lab var smsastat05 "Metro CBSA FIPS Code"
notes smsastat05: CPS: h-metsta gemetsta gtcbsa
notes smsastat05: Available 2005-April 2014


gen smsastat14=.

#delimit ;
lab define smsastat14
10180 "Abilene, TX"
10420 "Akron, OH"
10500 "Albany, GA"
10580 "Albany-Schenectady-Troy, NY"
10740 "Albuquerque, NM"
10900 "Allentown-Bethlehem-Easton, PA-NJ"
11020 "Altoona, PA"
11100 "Amarillo, TX"
11300 "Anderson, IN*"
11340 "Anderson, SC*"
11460 "Ann Arbor, MI"
11500 "Anniston-Oxford-Jacksonville, AL"
11540 "Appleton, WI"
11700 "Asheville, NC"
12020 "Athens-Clarke County, GA"
12060 "Atlanta-Sandy Springs-Roswell, GA"
12100 "Atlantic City-Hammonton, NJ"
12220 "Auburn-Opelika, AL"
12260 "Augusta-Richmond County, GA-SC"
12420 "Austin-Round Rock, TX"
12540 "Bakersfield, CA"
12580 "Baltimore-Columbia-Towson, MD"
12620 "Bangor, ME"
12700 "Barnstable, MA"
12940 "Baton Rouge, LA"
12980 "Battle Creek, MI"
13140 "Beaumont-Port Arthur, TX"
13380 "Bellingham, WA*"
13460 "Bend-Redmond, OR"
13740 "Billings, MT"
13780 "Binghamton, NY"
13820 "Birmingham-Hoover, AL"
13980 "Blacksburg—Christiansburg-Radford, VA"
14010 "Bloomington, IL"
14020 "Bloomington, IN"
14060 "Bloomington-Normal, IL*"
14260 "Boise City, ID"
14460 "Boston-Cambridge-Newton, MA-NH"
14500 "Boulder, CO"
14540 "Bowling Green, KY"
14740 "Bremerton-Silverdale, WA*"
14860 "Bridgeport-Stamford-Norwalk, CT"
15180 "Brownsville-Harlingen, TX"
15380 "Buffalo-Cheektowaga-Niagara Falls, NY"
15500 "Burlington, NC"
15540 "Burlington-South Burlington, VT"
15680 "California-Lexington Park, MD"
15940 "Canton-Massillon, OH"
15980 "Cape Coral-Fort Myers, FL"
16060 "Carbondale-Marion, IL"
16300 "Cedar Rapids, IA"
16540 "Chambersburg-Waynesboro, PA"
16580 "Champaign-Urbana, IL"
16620 "Charleston, WV"
16700 "Charleston-North Charleston, SC"
16740 "Charlotte-Concord-Gastonia, NC-SC"
16820 "Charlottesville, VA"
16860 "Chattanooga, TN-GA"
16980 "Chicago-Naperville-Elgin, IL-IN-WI"
17020 "Chico, CA"
17140 "Cincinnati, OH-KY-IN"
17300 "Clarksville, TN-KY"
17420 "Cleveland, TN"
17460 "Cleveland-Elyria, OH"
17660 "Coeur d’Alene, ID"
17780 "College Station-Bryan, TX"
17820 "Colorado Springs, CO"
17860 "Columbia, MO"
17900 "Columbia, SC"
17980 "Columbus, GA-AL"
18140 "Columbus, OH"
18580 "Corpus Christi, TX"
19100 "Dallas-Fort Worth-Arlington, TX"
19300 "Daphne-Fairhope-Foley, AL"
19340 "Davenport-Moline-Rock Island, IA-IL"
19380 "Dayton, OH"
19460 "Decatur, Al"
19500 "Decatur, IL"
19660 "Deltona-Daytona Beach-Ormond Beach, FL"
19740 "Denver-Aurora-Lakewood, CO"
19780 "Des Moines-West Des Moines, IA"
19820 "Detroit-Warren-Dearborn, MI"
20100 "Dover, DE"
20260 "Duluth, MN-WI"
20500 "Durham-Chapel Hill, NC"
20700 "East Stroudsburg, PA"
20740 "Eau Claire, WI"
20940 "El Centro, CA"
21140 "Elkhart-Goshen, IN"
21340 "El Paso, TX"
21500 "Erie, PA"
21660 "Eugene, OR"
21780 "Evansville, IN-KY"
22020 "Fargo, ND-MN"
22140 "Farmington, NM"
22180 "Fayetteville, NC"
22220 "Fayetteville-Springdale-Rogers, AR-MO"
22420 "Flint, MI"
22500 "Florence, SC"
22520 "Florence-Muscle Shoals, AL"
22660 "Fort Collins, CO"
22900 "Fort Smith, AR-OK"
23020 "Fort Walton Beach-Crestview-Destin, FL*"
23060 "Fort Wayne, IN"
23420 "Fresno, CA"
23540 "Gainesville, FL"
23580 "Gainesville, GA"
24020 "Glen Falls, NY"
24140 "Goldsboro, NC"
24340 "Grand Rapids-Wyoming, MI"
24540 "Greeley, CO"
24580 "Green Bay, WI"
24660 "Greensboro-High Point, NC"
24780 "Greenville, NC"
24860 "Greenville, SC"
25060 "Gulfport-Biloxi, MS*"
25180 "Hagerstown-Martinsburg, MD-WV"
25260 "Hanford-Corcoran, CA"
25420 "Harrisburg-Carlisle, PA"
25500 "Harrisonburg, VA*"
25540 "Hartford-West Hartford-East Hartford, CT"
25860 "Hickory-Morganton-Lenoir, NC"
25940 "Hilton Head Island-Bluffton-Beaufort, SC"
26100 "Holland-Grand Haven, MI*"
26180 "Honolulu, HI*"
26420 "Houston-Baytown-Sugar Land, TX"
26580 "Huntington-Ashland, WV-KY-OH"
26620 "Huntsville, AL"
26820 "Idaho Falls, ID"
26900 "Indianapolis, IN"
26980 "Iowa City, IA"
27100 "Jackson, MI"
27140 "Jackson, MS"
27260 "Jacksonville, FL"
27340 "Jacksonville, NC"
27500 "Janesville-Beloit, WI"
27740 "Johnson City, TN"
27780 "Johnstown, PA"
27900 "Joplin, MO*"
27980 "Kahului-Wailuku-Lahaina, HI"
28020 "Kalamazoo-Portage, MI"
28100 "Kankakee-Bradley, IL*"
28140 "Kansas City, MO-KS"
28420 "Kennewick-Richland, WA"
28660 "Killeen-Temple-Fort Hood, TX"
28700 "Kingsport-Bristol, TN-VA"
28740 "Kingston, NY*"
28940 "Knoxville, TN"
29100 "La Crosse, WI-MN*"
29180 "Lafayette, LA"
29200 "Lafayette-West Lafayette, IN"
29340 "Lake Charles, LA"
29460 "Lakeland-Winter Haven, FL"
29540 "Lancaster, PA"
29620 "Lansing-East Lansing, MI"
29700 "Laredo, TX"
29740 "Las Cruces, NM"
29820 "Las Vegas-Paradise, NV"
29940 "Lawrence, KS*"
30020 "Lawton, OK*"
30340 "Lewiston-Auburn, ME"
30460 "Lexington-Fayette, KY"
30780 "Little Rock-North Little Rock, AR"
30980 "Longview, TX"
31080 "Los Angeles-Long Beach-Anaheim, CA (Note the CBSA code change between 2003 and 2013)"
31100 "Los Angeles-Long Beach-Santa Ana, CA*"
31140 "Louisville, KY-IN"
31180 "Lubbock, TX"
31340 "Lynchburg, VA*"
31420 "Macon, GA"
31460 "Madera, CA*"
31540 "Madison, WI"
31700 "Manchester-Nashua, NH"
32580 "McAllen-Edinburg-Mission, TX"
32780 "Medford, OR"
32820 "Memphis, TN-MS-AR"
32900 "Merced, CA*"
33100 "Miami-Fort Lauderdale-West Palm Beach, FL"
33140 "Michigan City-La Porte, IN*"
33260 "Midland, TX*"
33340 "Milwaukee-Waukesha-West Allis, WI"
33460 "Minneapolis-St Paul-Bloomington, MN-WI"
33660 "Mobile, AL"
33700 "Modesto, CA"
33740 "Monroe, LA"
33780 "Monroe, MI"
33860 "Montgomery, AL"
34060 "Morgantown, WV"
34580 "Mount Vernon-Anacortes, WA"
34740 "Muskegon-Norton Shores, MI"
34820 "Myrtle Beach-Conway-North Myrtle Beach, SC-NC"
34900 "Napa, CA*"
34940 "Naples-Immokalee-Marco Island, FL"
34980 "Nashville-Davidson-Murfreesboro, TN"
35300 "New Haven-Milford, CT"
35380 "New Orleans-Metairie, LA"
35620 "New York-Newark- Jersey City, NY-NJ-PA (White Plains central city recoded to balance of metropolitan)"
35660 "Niles-Benton Harbor, MI"
35840 "North-Port-Sarasota-Bradenton, FL"
35980 "Norwich-New London, CT"
36100 "Ocala, FL"
36140 "Ocean City, NJ*"
36220 "Odessa, TX"
36260 "Ogden-Clearfield, UT"
36420 "Oklahoma City, OK"
36500 "Olympia, WA*"
36540 "Omaha-Council Bluffs, NE-IA"
36740 "Orlando, FL"
36780 "Oshkosh-Neenah, WI"
37100 "Oxnard-Thousand Oaks-Ventura, CA"
37340 "Palm Bay-Melbourne-Titusville, FL"
37460 "Panama City, FL"
37860 "Pensacola-Ferry Pass-Brent, FL"
37900 "Peoria, IL"
37980 "Philadelphia-Camden-Wilmington, PA-NJ-DE"
38060 "Phoenix-Mesa-Scottsdale, AZ"
38220 "Pine Bluff, AR"
38300 "Pittsburgh, PA"
38860 "Portland-South Portland, ME"
38900 "Portland-Vancouver-Hillsboro, OR-WA"
38940 "Port St. Lucie-Fort Pierce, FL"
39100 "Poughkeepsie-Newburgh-Middletown, NY*"
39140 "Prescott, AZ"
39300 "Providence-Warwick, RI-MA"
39340 "Provo-Orem, UT"
39380 "Pueblo, CO*"
39460 "Punta Gorda, FL*"
39540 "Racine, WI"
39580 "Raleigh, NC"
39740 "Reading, PA"
39820 "Redding, CA"
39900 "Reno-Sparks, NV*"
40060 "Richmond, VA"
40140 "Riverside-San Bernardino-Ontario, CA"
40220 "Roanoke, VA"
40380 "Rochester, NY"
40420 "Rockford, IL"
40900 "Sacramento--Arden-Arcade–Roseville, CA"
40980 "Saginaw, MI"
41060 "St. Cloud, MN*"
41100 "St. George, UT"
41180 "St. Louis, MO-IL"
41420 "Salem, OR"
41500 "Salinas, CA"
41540 "Salisbury, MD"
41620 "Salt Lake City, UT"
41700 "San Antonio, TX"
41740 "San Diego-Carlsbad-San Marcos, CA"
41860 "San Francisco-Oakland-Fremont, CA"
41940 "San Jose-Sunnyvale-Santa Clara, CA"
42020 "San Luis Obispo-Paso Robles, CA"
42060 "Santa Barbara-Santa Maria-Goleta, CA*"
42100 "Santa Cruz-Watsonville, CA"
42140 "Santa Fe, NM"
42220 "Santa Rosa-Petaluma, CA"
42260 "Sarasota-Bradenton-Venice, FL*"
42340 "Savannah, GA"
42540 "Scranton--Wilkes-Barre, PA"
42660 "Seattle-Tacoma-Bellevue, WA"
43300 "Sherman-Dennison, TX"
43340 "Shreveport-Bossier City, LA"
43620 "Sioux Falls, SD"
43780 "South Bend-Mishawaka, IN-MI"
43900 "Spartanburg, SC"
44060 "Spokane-Spokane Valley, WA"
44100 "Springfield, IL"
44140 "Springfield, MA"
44180 "Springfield, MO"
44220 "Springfield, OH*"
44700 "Stockton, CA"
45060 "Syracuse, NY"
45220 "Tallahassee, FL"
45300 "Tampa-St. Petersburg-Clearwater, FL"
45460 "Terre Haute, IN"
45780 "Toledo, OH"
45820 "Topeka, KS"
45940 "Trenton, NJ"
46060 "Tucson, AZ"
46140 "Tulsa, OK"
46220 "Tuscaloosa, AL*"
46340 "Tyler, TX"
46520 "Urban Honolulu, HI"
46540 "Utica-Rome, NY"
46660 "Valdosta, GA*"
46700 "Vallejo-Fairfield, CA"
46940 "Vero Beach, FL"
47020 "Victoria, TX*"
47220 "Vineland-Bridgeton, NJ"
47260 "Virginia Beach-Norfolk-Newport News, VA-NC"
47300 "Visalia-Porterville, CA"
47380 "Waco, TX"
47580 "Warner Robins, GA"
47900 "Washington-Arlington-Alexandria, DC-VA-MD-WV"
47940 "Waterloo-Cedar Falls, IA"
48060 "Watertown-Fort Drum, NY"
48140 "Wausau, WI"
48620 "Wichita, KS"
48660 "Wichita Falls, TX"
48700 "Williamsport, PA"
49020 "Winchester, VA-WV"
49180 "Winston-Salem, NC"
49340 "Worcester, MA-CT"
49420 "Yakima, WA*"
49620 "York-Hanover, PA"
49660 "Youngstown-Warren-Boardman, OH-PA"
49740 "Yuma, AZ"
70750 "Bangor, ME"
70900 "Barnstable Town, MA"
71650 "Boston-Cambridge-Quincy, MA-NH"
71950 "Bridgeport-Stamford-Norwalk, CT"
72400 "Burlington-South Burlington, VT"
72850 "Danbury, CT"
73450 "Hartford-West Hartford-East Hartford, CT"
74500 "Leominster-Fitchburg-Gardner, MA"
75700 "New Haven, CT"
76450 "Norwich-New London, CT-RI"
76750 "Portland-South Portland, ME"
77200 "Providence-Fall River-Warwick, RI-MA"
77350 "Rochester-Dover, NH-ME"
78100 "Springfield, MA-CT"
78700 "Waterbury, CT"
79600 "Worcester, MA-CT"
;
#delimit cr

lab val smsastat14 smsastat14
lab var smsastat14 "Metro CBSA FIPS Code"
notes smsastat14: CPS: h-metsta gemetsta gtcbsa
notes smsastat14: May 2014-on


gen cmsacode05=.

#delimit ;
lab define cmsacode05
118 "Appleton-Oshkosh-Neenah, WI"
176 "Chicago-Naperville-Michigan City, IL-IN-WI (part)"
178 "Cincinnati-Middletown-Wilmington, OH-KY-IN (part)"
184 "Cleveland-Akron-Elyria, OH (part)"
206 "Dallas-Fort Worth, TX (part)"
212 "Dayton-Springfield-Greenville, OH (part)"
216 "Denver-Aurora-Boulder, CO"
220 "Detroit-Warren-Flint, MI"
260 "Fresno-Madera, CA"
266 "Grand Rapids-Muskegon-Holland, MI (part)"
268 "Greensboro-Winston-Salem-High Point, NC (part)"
272 "Greenville-Anderson-Seneca, SC (part)"
288 "Houston-Baytown-Huntsville, TX (part)"
290 "Huntsville-Decatur, AL"
294 "Indianapolis-Anderson-Columbus, IN (part)"
304 "Johnson City-Kingsport-Bristol, TN-VA (part)"
348 "Los Angeles-Long Beach-Riverside, CA"
356 "Macon-Warner-Robins-Fort Valley, GA (part)"
376 "Milwaukee-Racine-Waukesha, WI"
378 "Minneapolis-St. Paul-St. Cloud, MN-WI (part)"
408 "New York-Newark-Bridgeport, NY-NJ-CT-PA (part)"
428 "Philadelphia-Camden-Vineland, PA-NJ-DE-MD (part)"
450 "Raleigh-Durham-Cary, NC (part)"
472 "Sacramento-Arden-Arcade-Truckee, CA-NV (part)"
482 "Salt Lake City-Ogden-Clearfield, UT (part)"
488 "San Jose-San Francisco-Oakland, CA"
500 "Seattle-Tacoma-Olympia, WA (part)"
548 "Washington-Baltimore-Northern Virginia, DC-MD-VA-WV (part)"
715 "Boston-Worcester-Manchester, MA-NH-CT-ME (part)"
720 "Bridgeport-New Haven-Stamford, CT"
;
#delimit cr


lab var cmsacode05 "CSA Code"
lab val cmsacode05 cmsacode05
notes cmsacode05: CPS: gtcsa
notes cmsacode05: Consistent from 2005-April 2014

gen cmsacode14=.

#delimit ;
lab define cmsacode14
104 "Albany-Schenectady, NY"
106 "Albuquerque-Santa Fe-Las Vegas, NM"
118 "Appleton-Oshkosh-Neenah, WI"
122 "Atlanta--Athens-Clarke County—Sandy Springs, GA"
148 "Boston-Worcester-Providence, MA-RI-NH-CT"
162 "Cape Coral-Fort Myers-Naples, FL"
168 "Cedar Rapids-Iowa City, IA"
170 "Charleston-Huntington-Ashland, WV-OH-KY"
174 "Chattanooga-Cleveland-Dalton, TN-GA"
176 "Chicago-Naperville-Michigan City, IL-IN-WI"
184 "Cleveland-Akron-Canton, OH (part)"
194 "Columbus-Auburn-Opelika, GA-AL"
206 "Dallas-Fort Worth, TX-OK"
212 "Dayton-Springfield, OH"
216 "Denver-Aurora, CO"
220 "Detroit-Warren-Ann Arbor, MI"
238 "El Paso-Las Cruses, TX-NM"
260 "Fresno-Madera, CA"
266 "Grand Rapids-Wyoming-Muskegon, MI"
268 "Greensboro--Winston-Salem–High Point, NC"
272 "Greenville-Anderson-Seneca, SC"
273 "Greenville-Spartanburg-Anderson, SC"
276 "Harrisburg-York-Lebanon, PA"
278 "Hartford-West Hartford, CT"
290 "Huntsville-Decatur, AL"
294 "Indianapolis-Anderson-Columbus, IN"
304 "Johnson City-Kingsport-Bristol, TN-VA (part)"
310 "Kalamazoo-Battle Creek-Portage, MI"
340 "Little Rock-North Little Rock, AR"
348 "Los Angeles-Long Beach-Riverside, CA"
356 "Macon-Warner Robins-Fort Valley, GA"
357 "Madison-Janesville-Beloit, WI"
370 "Miami-Fort Lauderdale-Port St. Lucie, FL"
376 "Milwaukee-Racine-Waukesha, WI"
378 "Minneapolis-St. Paul-St. Cloud, MN"
380 "Mobile-Daphne-Fairhope, AL"
408 "New York-Newark-Bridgeport, NY-NJ-CT-PA (part)"
422 "Orlando-Deltona-Daytona Beach, FL"
428 "Philadelphia-Reading-Camden, PA-NJ-DE-MD"
438 "Portland-Lewiston-South Portland, ME"
440 "Portland-Vancouver-Salem, OR-WA"
450 "Raleigh-Durham-Cary, NC"
482 "Salt Lake City-Provo-Orem, UT"
488 "San Jose-San Francisco-Oakland, CA"
500 "Seattle-Tacoma-Olympia, WA"
515 "South Bend-Elkhart-Mishawaka, IN-MI"
518 "Spokane-Spokane Valley-Coeur d’Alene, WA-ID"
546 "Visalia-Porterville-Hanford, CA"
548 "Washington-Baltimore-Arlington, DC-MD-VA-WV-PA"
715 "Boston-Worcester-Manchester, MA-NH-CT-ME"
720 "Bridgeport-New Haven-Stamford, CT"
;
#delimit cr

lab var cmsacode14 "CSA Code"
lab val cmsacode14 cmsacode14
notes cmsacode14: CPS: gtcsa
notes cmsacode14: Consistent from May 2014-on

gen fipscounty=.

lab var fipscounty "FIPS County Code"
notes fipscounty: Use with state code to create unique county
notes fipscounty: Available 1995:9 -on
notes fipscounty: CPS: gtco, geco

gen principalcty=.

/* 
Copyright 2020 CEPR and John Schmitt

This file is part of the cepr_org_master.do program. This file and all
programs referenced in it are free software. You can redistribute the
program or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
USA.
*/

